<h1> Simulations: </h1>
<table cellpadding="5">
<% for simulation in @system.simulations %>
	<tr>
		<td valign="top">
			<%= simulation.name %>
		</td>
		<td valign="top">
			Planets included in simulation: <br />
			<% for planet in Simulation.included_planets(simulation.id) %>
				<%= planet.name %> <br />
			<% end %>
		</td>
		<td>
			<%= link_to "Simulate!", :action => :start_simulation, :simulation_id => simulation, :id => simulation.system_id %> <br />
			<%= link_to "Edit integration parameters", :controller => 'integration_parameters', 
									:action => :edit, :id => simulation.integration_parameter.id, 
									:simulation_id => simulation %> <br />
			<%= link_to "Edit small body parameters", :controller => 'small_body_parameters', 
									:action => :edit, :id => simulation.small_body_parameter.id, 
									:simulation_id => simulation %>  <br />
			<%= link_to "Delete sim", :controller => :simulations, :action => :destroy, 
									:simulation_id => simulation.id, :system_id => @system.id %> <br />
		</td>
	</tr>
<% end %>

</table>
<%= link_to "Create a new simulation", :controller => :simulations, :action => :new, :system_id => @system.id %>

